﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SQLite;
using SQLiteNetExtensions.Attributes;

namespace Dt261.Model
{

    //data class MemberEntity(
    //@PrimaryKey
    //val id: String,
    //var name: String,
    //var sex: Int,
    //var birthday: Long,
    //var address: String? = null,
    //var phone: String? = null,
    //var cooperationId: String? = null
//)

    [Table("memberinfo")]
    public class MemberInfo
    {
        private int id;
        private string address;
        private int age;
        private string allergyHistory;
        private DateTime birthday;
        private DateTime createTime;
        private string deafAidLeftModel;
        private string deafAidRightModel;
        private string deafAidRoutine;
        private string deafAidThreshold;
        private string deafAidVolume;
        private string deviceWT;
        private string email;
        private int gender;
        private string history;
        private string hospitalId;
        private string uid;
        private string idCard;
        private string insurance;
        private int isUpload;
        private DateTime lastTestTime;
        private string listenWord;
        private string mark;
        private string name;
        private string note;
        private string phone;
       // @property(nullable, nonatomic, copy) NSData* selfPhoto;
        private string soundField;
        private string strength;
        private int testTime;
        private string tinnitus;
        private string zipCode;
        private int state;
        private int modifyDate;
        //  @property(nullable, nonatomic, retain) NSSet<PureToneResult*>* results;
        // @property(nullable, nonatomic, retain) User* user;

        private string userId;


        [PrimaryKey, AutoIncrement]
        public int Id { get => id; set => id = value; }
        public string Uid { get => uid; set => uid = value; }

        public string Address { get => address; set => address = value; }
        public int Age { get {
                return age;
            } set => age = value; }
        public string AllergyHistory { get => allergyHistory; set => allergyHistory = value; }
        public DateTime Birthday { get => birthday; set => birthday = value; }
        public DateTime CreateTime { get => createTime; set => createTime = value; }
        public string DeafAidLeftModel { get => deafAidLeftModel; set => deafAidLeftModel = value; }
        public string DeafAidRightModel { get => deafAidRightModel; set => deafAidRightModel = value; }
        public string DeafAidRoutine { get => deafAidRoutine; set => deafAidRoutine = value; }
        public string DeafAidThreshold { get => deafAidThreshold; set => deafAidThreshold = value; }
        public string DeafAidVolume { get => deafAidVolume; set => deafAidVolume = value; }
        public string DeviceWT { get => deviceWT; set => deviceWT = value; }
        public string Email { get => email; set => email = value; }
        public int Gender { get => gender; set => gender = value; }
        public string History { get => history; set => history = value; }
        public string HospitalId { get => hospitalId; set => hospitalId = value; }
        
        public string IdCard { get => idCard; set => idCard = value; }
        public string Insurance { get => insurance; set => insurance = value; }
        public int IsUpload { get => isUpload; set => isUpload = value; }
        public DateTime LastTestTime { get => lastTestTime; set => lastTestTime = value; }
        public string ListenWord { get => listenWord; set => listenWord = value; }
        public string Mark { get => mark; set => mark = value; }
        public string Name { get => name; set => name = value; }
        public string Note { get => note; set => note = value; }
        public string Phone { get => phone; set => phone = value; }
        public string SoundField { get => soundField; set => soundField = value; }
        public string Strength { get => strength; set => strength = value; }
        public int TestTime { get => testTime; set => testTime = value; }
        public string Tinnitus { get => tinnitus; set => tinnitus = value; }
        public string ZipCode { get => zipCode; set => zipCode = value; }
        public int State { get => state; set => state = value; }
        public int ModifyDate { get => modifyDate; set => modifyDate = value; }
        public string UserId { get => userId; set => userId = value; }

        [OneToMany]
        public List<PureToneResult> Results { get; set; }
    }
}
